package com.service;

import com.dao.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pojo.Dept;

import java.util.List;

@Service
public class DeptService {
    @Autowired
    DeptMapper deptMapper;

    public List<Dept> getDepartments(){
        return deptMapper.getDepartments();
    }

    public void deleteDept(int id){
        deptMapper.deleteDept(id);
    }

    public void addDept(Dept dept){
         deptMapper.insertDept(dept);
    }
}
